#include<bits/stdc++.h>
using namespace std;
int a[100005];
int r[100005];
int main(){
	freopen("duel.in", "r", stdin);
	freopen("duel.out", "w", stdout);
    int n;
    scanf("%d", &n);
	int tot = n;
	for(int i = 0; i < n; i++)	scanf("%d", a + i),r[a[i]]++;
	for(int i = 0; i < n; i++)
		for(int j = a[i] - 1; j >= 0; j--)
			if(r[j] > 0){
				tot--;
				r[j]--;
				break;
			}
	printf("%d\n", tot);
    return 0;
}